package org.hackystat.sdsa.analyzer.model.activity;

import jess.Batch;
import jess.Rete;

import org.junit.Before;
import org.junit.Test;

/**
 * Provides basic class for activity testing. 
 * 
 * @author Hongbing Kou
 */
public abstract class ActivityTestBase {
  /** Defines rete rule engine. */
  protected Rete engine;
  
  /**
   * Instantiate instance for test purpose.
   * 
   * @throws Exception If error while set up data for test.
   */
  @Before public void setUp() throws Exception {
    this.engine = new Rete();
    Batch.batch("/org/hackystat/sdsa/analyzer/model/rules/ActivityTemplate.clp", 
        this.engine);
  }

  /**
   * Converts this action to Jess fact.
   * 
   * @throws Exception If error while testing.
   */
  @Test public abstract void testJessFactConversion() throws Exception;
}
